/*
 * repeatAnalyser.h
 *
 *  Created on: Apr 17, 2013
 *      Author: hxin
 */

#ifndef REPEATANALYSER_H_
#define REPEATANALYSER_H_

#include "HashTable.h"
#include <vector>
#include <string>
#include <iostream>
#include <fstream>

using namespace std;

class RepeatAnalyser {
public:
	//Constructor & Destructor
	RepeatAnalyser();
	~RepeatAnalyser();

	//Load File
	void loadRefFile(string RefName);
	void loadHashFile(string HashName);

	//Analyse one chromosome throughly
	bool loadChromo(int chromoNum);
	void markRepeat(int threshold);
	void markTandemRepeat(int error);

private:
	ifstream refFile;
	vector<streampos> refPos;
	string chromosome;
	HashTable ht;

	//Repeat Marker
	bool * validMark;
	bool * repeatMark;
	bool * tandemMark;
};


#endif /* REPEATANALYSER_H_ */
